package vip.web3.common.enums;

/**
 * 是否激活 0 未激活, 1已激活：成功下单激活
 *
 * aut-horlilei
 */

public enum ActiveEnum {

    /**
     * 未激活
     */
    NO_ACTIVE(0, "未激活"),

    /**
     * 已激活
     */
    ACTIVE(1, "已激活"),
    ;

    private final Integer code;
    private final String desc;

    ActiveEnum(Integer code, String desc) {
        this.code = code;
        this.desc = desc;
    }

    public static ActiveEnum get(Integer code) {
        for (ActiveEnum value : values()) {
            if (value.code.equals(code)) {
                return value;
            }
        }
        return null;
    }

    public Integer getCode() {
        return code;
    }

    public String getDesc() {
        return desc;
    }
}
